<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>digichef.registration.views</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="digichef-module.html">Package&nbsp;digichef</a> ::
        <a href="digichef.registration-module.html">Package&nbsp;registration</a> ::
        Module&nbsp;views
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="digichef.registration.views-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module views</h1><p class="nomargin-top"><span class="codelink"><a href="digichef.registration.views-pysrc.html">source&nbsp;code</a></span></p>
<pre class="literalblock">

Views which allow users to create and activate accounts.

</pre>

<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="digichef.registration.views-module.html#activate" class="summary-sig-name">activate</a>(<span class="summary-sig-arg">request</span>,
        <span class="summary-sig-arg">activation_key</span>,
        <span class="summary-sig-arg">template_name</span>=<span class="summary-sig-default">'registration/activate.html'</span>,
        <span class="summary-sig-arg">extra_context</span>=<span class="summary-sig-default">None</span>)</span><br />
      Activate a ``User``'s account from an activation key, if their key
is valid and hasn't expired.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="digichef.registration.views-pysrc.html#activate">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="digichef.registration.views-module.html#register" class="summary-sig-name">register</a>(<span class="summary-sig-arg">request</span>,
        <span class="summary-sig-arg">success_url</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">form_class</span>=<span class="summary-sig-default">RegistrationForm</span>,
        <span class="summary-sig-arg">profile_callback</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">template_name</span>=<span class="summary-sig-default">'registration/registration_form.html'</span>,
        <span class="summary-sig-arg">extra_context</span>=<span class="summary-sig-default">None</span>)</span><br />
      Allow a new user to register an account.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="digichef.registration.views-pysrc.html#register">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="activate"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">activate</span>(<span class="sig-arg">request</span>,
        <span class="sig-arg">activation_key</span>,
        <span class="sig-arg">template_name</span>=<span class="sig-default">'registration/activate.html'</span>,
        <span class="sig-arg">extra_context</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="digichef.registration.views-pysrc.html#activate">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">

Activate a ``User``'s account from an activation key, if their key
is valid and hasn't expired.

By default, use the template ``registration/activate.html``; to
change this, pass the name of a template as the keyword argument
``template_name``.

**Required arguments**

``activation_key``
   The activation key to validate and use for activating the
   ``User``.

**Optional arguments**
   
``extra_context``
    A dictionary of variables to add to the template context. Any
    callable object in this dictionary will be called to produce
    the end result which appears in the context.

``template_name``
    A custom template to use.

**Context:**

``account``
    The ``User`` object corresponding to the account, if the
    activation was successful. ``False`` if the activation was not
    successful.

``expiration_days``
    The number of days for which activation keys stay valid after
    registration.

Any extra variables supplied in the ``extra_context`` argument
(see above).

**Template:**

registration/activate.html or ``template_name`` keyword argument.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="register"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">register</span>(<span class="sig-arg">request</span>,
        <span class="sig-arg">success_url</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">form_class</span>=<span class="sig-default">RegistrationForm</span>,
        <span class="sig-arg">profile_callback</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">template_name</span>=<span class="sig-default">'registration/registration_form.html'</span>,
        <span class="sig-arg">extra_context</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="digichef.registration.views-pysrc.html#register">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">

Allow a new user to register an account.

Following successful registration, issue a redirect; by default,
this will be whatever URL corresponds to the named URL pattern
``registration_complete``, which will be
``/accounts/register/complete/`` if using the included URLConf. To
change this, point that named pattern at another URL, or pass your
preferred URL as the keyword argument ``success_url``.

By default, ``registration.forms.RegistrationForm`` will be used
as the registration form; to change this, pass a different form
class as the ``form_class`` keyword argument. The form class you
specify must have a method ``save`` which will create and return
the new ``User``, and that method must accept the keyword argument
``profile_callback`` (see below).

To enable creation of a site-specific user profile object for the
new user, pass a function which will create the profile object as
the keyword argument ``profile_callback``. See
``RegistrationManager.create_inactive_user`` in the file
``models.py`` for details on how to write this function.

By default, use the template
``registration/registration_form.html``; to change this, pass the
name of a template as the keyword argument ``template_name``.

**Required arguments**

None.

**Optional arguments**

``form_class``
    The form class to use for registration.

``extra_context``
    A dictionary of variables to add to the template context. Any
    callable object in this dictionary will be called to produce
    the end result which appears in the context.

``profile_callback``
    A function which will be used to create a site-specific
    profile instance for the new ``User``.

``success_url``
    The URL to redirect to on successful registration.

``template_name``
    A custom template to use.

**Context:**

``form``
    The registration form.

Any extra variables supplied in the ``extra_context`` argument
(see above).

**Template:**

registration/registration_form.html or ``template_name`` keyword
argument.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Thu Apr  1 02:28:19 2010
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
